package com.lrc.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author luo
 * @date 2021/9/27 22:51
 */
@RestController
@RefreshScope
@Slf4j
public class ApolloConfigController {

    @Value("${apolloKey}")
    private String apolloKey;

    @RequestMapping("/apollo")
    public String getApolloKey() {
        log.info("apolloConfig.apolloKey============{}",apolloKey);
        return apolloKey;
    }

}
